Skip to content

app engine compatibility: handle missing httplib._CS_* constants #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2019

Conversation

snarfed
Copy link
Contributor

@snarfed snarfed commented Jan 16, 2018

fixes #320. thanks in advance! tests pass for me with this. i haven't added any new test(s), but i'm open to suggestions.

snarfed added a commit to snarfed/webutil that referenced this pull request Mar 24, 2018
specifically PythonCharmers/python-future#321 and PythonCharmers/python-future#331.

I tried telling setup.py to use my fork on github instead, with dependency_links=, but that requires users to install with pip install --process-dependency_links, which I don't want to depend on.
@jacobg
Copy link

jacobg commented Aug 9, 2018

Any change this PR can get merged in? I'm also running into the error that this PR fixes.

@snarfed
Copy link
Contributor Author

snarfed commented Aug 9, 2018

@jacobg seems unlikely, they haven't done anything with this project in over a year.

@jacobg
Copy link

jacobg commented Aug 9, 2018

@snarfed Thanks, I ended up monkey patching it:

def _fix_future_http():
    import httplib
    if not getattr(httplib, '_CS_IDLE', None):
        setattr(httplib, '_CS_IDLE', None)
    if not getattr(httplib, '_CS_REQ_STARTED', None):
        setattr(httplib, '_CS_REQ_STARTED', None)
    if not getattr(httplib, '_CS_REQ_SENT', None):
        setattr(httplib, '_CS_REQ_SENT', None)

@snarfed snarfed force-pushed the app_engine_httplib branch from 7f7b8dc to c35e6e5 Compare October 10, 2018 21:52
@jmadler jmadler merged commit 0d8c482 into PythonCharmers:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http.client broken on google app engine
3 participants